package std

// In tests if the importPath is part of the stdlib
func In(importPath string) bool {
	_, isset := stdlib[importPath]
	return isset
}

// Supported tests if the importPath is supported by Joy
func Supported(importPath string) bool {
	return stdlib[importPath]
}

// the result of running "go list std"
var stdlib = map[string]bool{
	"archive/tar":                       false,
	"archive/zip":                       false,
	"bufio":                             false,
	"bytes":                             false,
	"compress/bzip2":                    false,
	"compress/flate":                    false,
	"compress/gzip":                     false,
	"compress/lzw":                      false,
	"compress/zlib":                     false,
	"container/heap":                    false,
	"container/list":                    false,
	"container/ring":                    false,
	"context":                           false,
	"crypto":                            false,
	"crypto/aes":                        false,
	"crypto/cipher":                     false,
	"crypto/des":                        false,
	"crypto/dsa":                        false,
	"crypto/ecdsa":                      false,
	"crypto/elliptic":                   false,
	"crypto/hmac":                       false,
	"crypto/internal/cipherhw":          false,
	"crypto/md5":                        false,
	"crypto/rand":                       false,
	"crypto/rc4":                        false,
	"crypto/rsa":                        false,
	"crypto/sha1":                       false,
	"crypto/sha256":                     false,
	"crypto/sha512":                     false,
	"crypto/subtle":                     false,
	"crypto/tls":                        false,
	"crypto/x509":                       false,
	"crypto/x509/pkix":                  false,
	"database/sql":                      false,
	"database/sql/driver":               false,
	"debug/dwarf":                       false,
	"debug/elf":                         false,
	"debug/gosym":                       false,
	"debug/macho":                       false,
	"debug/pe":                          false,
	"debug/plan9obj":                    false,
	"encoding":                          false,
	"encoding/ascii85":                  false,
	"encoding/asn1":                     false,
	"encoding/base32":                   false,
	"encoding/base64":                   false,
	"encoding/binary":                   false,
	"encoding/csv":                      false,
	"encoding/gob":                      false,
	"encoding/hex":                      false,
	"encoding/json":                     true,
	"encoding/pem":                      false,
	"encoding/xml":                      false,
	"errors":                            true,
	"expvar":                            false,
	"flag":                              false,
	"fmt":                               true,
	"go/ast":                            false,
	"go/build":                          false,
	"go/constant":                       false,
	"go/doc":                            false,
	"go/format":                         false,
	"go/importer":                       false,
	"go/internal/gccgoimporter":         false,
	"go/internal/gcimporter":            false,
	"go/internal/srcimporter":           false,
	"go/parser":                         false,
	"go/printer":                        false,
	"go/scanner":                        false,
	"go/token":                          false,
	"go/types":                          false,
	"hash":                              false,
	"hash/adler32":                      false,
	"hash/crc32":                        false,
	"hash/crc64":                        false,
	"hash/fnv":                          false,
	"html":                              false,
	"html/template":                     false,
	"image":                             false,
	"image/color":                       false,
	"image/color/palette":               false,
	"image/draw":                        false,
	"image/gif":                         false,
	"image/internal/imageutil":          false,
	"image/jpeg":                        false,
	"image/png":                         false,
	"index/suffixarray":                 false,
	"internal/cpu":                      false,
	"internal/nettrace":                 false,
	"internal/poll":                     false,
	"internal/race":                     false,
	"internal/singleflight":             false,
	"internal/syscall/windows":          false,
	"internal/syscall/windows/registry": false,
	"internal/syscall/windows/sysdll":   false,
	"internal/testenv":                  false,
	"internal/trace":                    false,
	"io":                                false,
	"io/ioutil":                         false,
	"log":                               false,
	"log/syslog":                        false,
	"math":                              false,
	"math/big":                          false,
	"math/bits":                         false,
	"math/cmplx":                        false,
	"math/rand":                         false,
	"mime":                              false,
	"mime/multipart":                    false,
	"mime/quotedprintable":              false,
	"net":                            false,
	"net/http":                       false,
	"net/http/cgi":                   false,
	"net/http/cookiejar":             false,
	"net/http/fcgi":                  false,
	"net/http/httptest":              false,
	"net/http/httptrace":             false,
	"net/http/httputil":              false,
	"net/http/internal":              false,
	"net/http/pprof":                 false,
	"net/internal/socktest":          false,
	"net/mail":                       false,
	"net/rpc":                        false,
	"net/rpc/jsonrpc":                false,
	"net/smtp":                       false,
	"net/textproto":                  false,
	"net/url":                        false,
	"os":                             false,
	"os/exec":                        false,
	"os/signal":                      false,
	"os/user":                        false,
	"path":                           false,
	"path/filepath":                  false,
	"plugin":                         false,
	"reflect":                        false,
	"regexp":                         false,
	"regexp/syntax":                  false,
	"runtime":                        false,
	"runtime/cgo":                    false,
	"runtime/debug":                  false,
	"runtime/internal/atomic":        false,
	"runtime/internal/sys":           false,
	"runtime/pprof":                  false,
	"runtime/pprof/internal/profile": false,
	"runtime/race":                   false,
	"runtime/trace":                  false,
	"sort":                           false,
	"strconv":                        true,
	"strings":                        true,
	"sync":                           false,
	"sync/atomic":                    false,
	"syscall":                        false,
	"testing":                        false,
	"testing/internal/testdeps":      false,
	"testing/iotest":                 false,
	"testing/quick":                  false,
	"text/scanner":                   false,
	"text/tabwriter":                 false,
	"text/template":                  false,
	"text/template/parse":            false,
	"time":                           true,
	"unicode":                        false,
	"unicode/utf16":                  false,
	"unicode/utf8":                   false,
	"unsafe":                         false,
	"vendor/golang_org/x/crypto/chacha20poly1305":                   false,
	"vendor/golang_org/x/crypto/chacha20poly1305/internal/chacha20": false,
	"vendor/golang_org/x/crypto/curve25519":                         false,
	"vendor/golang_org/x/crypto/poly1305":                           false,
	"vendor/golang_org/x/net/http2/hpack":                           false,
	"vendor/golang_org/x/net/idna":                                  false,
	"vendor/golang_org/x/net/lex/httplex":                           false,
	"vendor/golang_org/x/net/nettest":                               false,
	"vendor/golang_org/x/net/proxy":                                 false,
	"vendor/golang_org/x/net/route":                                 false,
	"vendor/golang_org/x/text/secure":                               false,
	"vendor/golang_org/x/text/secure/bidirule":                      false,
	"vendor/golang_org/x/text/transform":                            false,
	"vendor/golang_org/x/text/unicode":                              false,
	"vendor/golang_org/x/text/unicode/bidi":                         false,
	"vendor/golang_org/x/text/unicode/norm":                         false,
}
